package com.dawnling.androidutils.typeface;

import com.blankj.utilcode.util.SPUtils;

public class InfoCache {
    public static String typeface = null;

    /**
     * 缓存统一登录成功后获取的typeface
     */
    public static void putTypeface(String typeface) {
        InfoCache.typeface = typeface;
        if (typeface == null) {
            SPUtils.getInstance().remove("typeface");
        } else {
            SPUtils.getInstance().put("typeface", typeface);
        }
    }

    /**
     * 获得typeface
     */
    public static String getTypeface() {
        if (typeface == null) {
            typeface = SPUtils.getInstance().getString("typeface");
        }
        return typeface;
    }
}
